package com.hanserwei.springbootlearn.mapper;

import com.hanserwei.springbootlearn.entity.Information;
import org.apache.ibatis.annotations.*;

@Mapper
public interface InformationMapper {
    @Select("select information  from information where id = #{id}")
    String selectUserInformationById(Integer id);

    @Insert("insert into information (information) values (#{information.information})")
    @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
    int insertUserInformation(@Param("information") Information information);

    @Update("update information set information = #{information} where id = #{id}")
    int updateUserInformation(Information information);

    @Delete("delete from information where id = #{id}")
    void deleteUserInformation(int i);
}
